var p1 = Promise.resolve('aaa');
var p2 = new Promise((resolve, reject) => {
	resolve(p1)
})

var p3 = new Promise((resolve, reject) => {
	resolve(p2)
})


var p  = Promise.resolve(Promise.resolve(Promise.resolve(Promise.resolve(p2))))
console.log(p)
p.then(value=> {
	console.log('-----------------------\n')
	console.log('p value ' + value)
}, reason=>{
	console.log('p reason ' + reason)
})


p2.then(value=> {
	console.log('-----------------------\n')
	console.log('p2 value ' + value)
}, reason=>{
	console.log('p2 reason ' + reason)
})




p1.then(value=> {
	console.log('-----------------------\n')
	console.log('p1 value ' + value)
}, reason=>{
	console.log('p1 reason ' + reason)
})



